package com.dayaokeji.server_api.api;

import com.dayaokeji.server_api.Page;
import com.dayaokeji.server_api.ServerResponse;
import com.dayaokeji.server_api.domain.Bulletin;
import com.dayaokeji.server_api.domain.MessageReceipt;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by Gorden on 2017/12/19.
 * 通知
 */

public interface BulletinApi {

    /**
     * 获取公告列表
     * @param start
     * @param length
     * @return
     */
    @GET("course/message/qurey")
    Call<ServerResponse<Page<Bulletin>>> messages(@Query("start") int start, @Query("length") int length);

    /**
     * 消息回执
     * @param messageReceipt
     * @return
     */
    @POST("course/message/update")
    Call<ServerResponse<Void>> receipt(@Body MessageReceipt messageReceipt);

    /**
     * 删除消息
     * @param params
     * @return
     */
    @POST("course/message/delete")
    Call<ServerResponse<Void>> delete(@Body Map<String, Integer> params);

}
